var Hogan = require('hogan.js');
var mm = {
	 renderHtml : function(htmlTemplate,data){
    	var template = Hogan.compile(htmlTemplate);//编译
    	var  result  = template.render(data);//输出
    	return result;
    },
    //获取url参数
    getUrlParam : function(name){
    	 var reg    = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
    	 var result = window.location.search.substr(1).match(reg);
    	 return result ? decodeURIComponent(result[2]) : null;
    }
   }
module.exports = mm;